from django.contrib import admin

# Register your models here.
from .models import Course

# 将Course数据放到admin管理页面上进行管理
@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    # 需要显示的字段
    list_display = ('name', 'introduction', 'teacher', 'price')
    # 可搜索的字段
    search_fields = list_display
    # 可过滤的字段
    list_fields = list_display